
import java.io.*;
import java.util.ArrayList;

/**
 * Class that handle the process of read file and put the data to arrayList
 */
public class readFile {
    public static boolean readFrom(String fileName, ArrayList<String> data) throws IOException{
        FileInputStream fileIn = new FileInputStream(fileName);
        BufferedReader readS = new BufferedReader( new InputStreamReader( fileIn ) );
        String s;

        int size = 0;
        do
        {
            s = readS.readLine();

            if (s != null)
            {
               data.add(s);
               size += 1;
            }
            else
                break;
        }
        while ( true );
        readS.close();
        fileIn.close();

        return true;
    }

}
